<html>
 <head>
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>PHP 测试</title>
 </head>
 <body>
 <?php echo '<p>Hello dadadakakaka World</p>'; ?>
<?php
    $mysqli = new mysqli("localhost", "root", "", "harvester");

/* check connection */
if ($mysqli->connect_errno) {
    printf("Connect failed: %s\n", $mysqli->connect_error);
    exit();
}

/* Create table doesn't return a resultset */
// if ($mysqli->query("CREATE TEMPORARY TABLE myCity LIKE City") === TRUE) {
    // printf("Table myCity successfully created.\n");
// }

/* Select queries return a resultset */
$mysqli->query("SET NAMES 'utf8'");
$tpl = "<img src='http://img2.fuckavmm.com/datas/%s'> %s %s<br/>";
if ($result = $mysqli->multi_query("SELECT postdate, title, preview FROM post order by pid desc")) {
    if ($result = $mysqli->use_result()) {
        while ($row = $result->fetch_row()) {
            printf($tpl,$row[2], $row[0], $row[1]);
        }
    }

    /* free result set */
    $result->close();
}
?>
 </body>
</html>